import request from '@/utils/request'

// 创建砍价列表
export function createBargainUser(data) {
  return request({
    url: '/store/bargain-user/create',
    method: 'post',
    data: data
  })
}

// 更新砍价列表
export function updateBargainUser(data) {
  return request({
    url: '/store/bargain-user/update',
    method: 'put',
    data: data
  })
}

// 删除砍价列表
export function deleteBargainUser(id) {
  return request({
    url: '/store/bargain-user/delete?id=' + id,
    method: 'delete'
  })
}

// 获得砍价列表
export function getBargainUser(id) {
  return request({
    url: '/store/bargain-user/get?id=' + id,
    method: 'get'
  })
}

// 获得砍价列表分页
export function getBargainUserPage(params) {
  return request({
    url: '/store/bargain-user/page',
    method: 'get',
    params
  })
}
// 导出砍价列表 Excel
export function exportBargainUserExcel(params) {
  return request({
    url: '/store/bargain-user/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}